package com.smm.web.vmc.service;

import com.smm.web.vmc.domain.Receipt;
import com.smm.web.vmc.domain.User;
import com.smm.web.vmc.domain.relation.UserReceiptRelation;

import java.util.List;

/**
 * Created by zhenghao on 2016/9/9.
 *
 */
public interface UserReceiptRelationService {

    /**
     * 获取指定用户所有仓单列表
     * @param userId
     * @return
     */
    List<Receipt> getReceiptByUser(int userId);

    /**
     * 获取指定仓单的关联用户
     * @param repNo
     * @return
     */
    List<User> getUserByReceipt(String repNo);

    void deleteByUer(int userId);

    void add(UserReceiptRelation relation);

    /**
     * 删除指定仓单的所有用户管理
     * @param repNo
     * @throws Exception
     */
    void deleteByReceipt(String repNo) throws Exception;

    /**
     * 获取指定用与指定仓单的关联关系
     * @param userAccount
     * @param repNo
     * @return
     */
    UserReceiptRelation getReceiptByUserAndRepNo(int  userId, String repNo);
}
